﻿<metro:Window x:Class="wp8skinswitcher.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:metro="http://schemas.codeplex.com/elysium"
        xmlns:params="http://schemas.codeplex.com/elysium/params"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        params:Manager.Theme="Light"
        params:Manager.AccentBrush="Purple"
        params:Manager.ContrastBrush="Green"
        xmlns:ignore="http://www.ignore.com"  
        mc:Ignorable="d ignore"
        Height="390"
        Width="520"
        Title="WP8 Emulator Skin Switcher"
        DataContext="{Binding Main, Source={StaticResource Locator}}" ResizeMode="NoResize">

    <metro:Window.Resources>
        <DataTemplate x:Key="PhoneTemplate">
            <StackPanel Width="120" Height="220">
                <Image Source="{Binding SkinUpUrl}" Height="160"/>
                <TextBlock Text="{Binding Title}" HorizontalAlignment="Center"/>
                <TextBlock Text="{Binding SubTitle}" HorizontalAlignment="Center"/>
                <TextBlock Text="{Binding CreatorName}" HorizontalAlignment="Center" FontSize="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="MouseLeftButtonDown">
                            <ei:LaunchUriOrFileAction Path="{Binding CreatorLink}"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </TextBlock>
            </StackPanel>
        </DataTemplate>
        <Style TargetType="{x:Type ListBoxItem}" x:Key="ContainerStyle">
            <Setter Property="ContentTemplate" Value="{StaticResource PhoneTemplate}" />
        </Style>

    </metro:Window.Resources>

    <Grid x:Name="LayoutRoot">
        <TabControl Margin="5,0" Grid.Row="0">
            <TabItem Header="WVGA">
                <Grid Margin="0">
                	<Grid.RowDefinitions>
                		<RowDefinition/>
                		<RowDefinition Height="20"/>
                		<RowDefinition Height="40"/>
                	</Grid.RowDefinitions>
                    <ListBox ItemsSource="{Binding WvgaPhones}" ItemContainerStyle="{StaticResource ContainerStyle}" SelectedItem="{Binding SelectedWvga, Mode=TwoWay}">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal"/>
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                    </ListBox>
                    <TextBlock TextWrapping="Wrap" Text="{Binding StatusTextWvga}" Grid.Row="1" Margin="0,0,0,5" FontStyle="Italic"/>
                    <StackPanel Orientation="Horizontal" Grid.Row="2">
                    	<Image Source="Assets/Windows 8.png" Width="30" Height="30" Margin="5,0,0,5"/>
                    	<StackPanel HorizontalAlignment="Right" Margin="230,0,0,0">
                    		<TextBlock TextWrapping="Wrap" Text="V1.0 http://wp8emulatorskins.codeplex.com" Margin="0" d:LayoutOverrides="Width" HorizontalAlignment="Right">
                    			<i:Interaction.Triggers>
                    				<i:EventTrigger EventName="MouseLeftButtonDown">
                    					<ei:LaunchUriOrFileAction Path="http://wp8emulatorskins.codeplex.com"/>
                    				</i:EventTrigger>
                    			</i:Interaction.Triggers>
                    		</TextBlock>
                    		<TextBlock TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0" d:LayoutOverrides="HorizontalAlignment"><Run Text="© Geert van der Cruijsen"/></TextBlock>
                    	</StackPanel>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem Header="WXGA">
            	<Grid Margin="0">
            		<Grid.RowDefinitions>
            			<RowDefinition/>
            			<RowDefinition Height="20"/>
            			<RowDefinition Height="40"/>
            		</Grid.RowDefinitions>
            		<ListBox ItemsSource="{Binding WxgaPhones}" ItemContainerStyle="{StaticResource ContainerStyle}" SelectedItem="{Binding SelectedWxga, Mode=TwoWay}">
            			<ListBox.ItemsPanel>
            				<ItemsPanelTemplate>
            					<StackPanel Orientation="Horizontal"/>
            				</ItemsPanelTemplate>
            			</ListBox.ItemsPanel>
            		</ListBox>
            		<TextBlock TextWrapping="Wrap" Text="{Binding StatusTextWxga}" Grid.Row="1" Margin="0,0,0,5"/>
                    <StackPanel Orientation="Horizontal" Grid.Row="2">
                        <Image Source="Assets/Windows 8.png" Width="30" Height="30" Margin="5,0,0,5"/>
                        <StackPanel HorizontalAlignment="Right" Margin="230,0,0,0">
                            <TextBlock TextWrapping="Wrap" Text="V1.0 http://wp8emulatorskins.codeplex.com" Margin="0" d:LayoutOverrides="Width" HorizontalAlignment="Right">
                    			<i:Interaction.Triggers>
                    				<i:EventTrigger EventName="MouseLeftButtonDown">
                    					<ei:LaunchUriOrFileAction Path="http://wp8emulatorskins.codeplex.com"/>
                    				</i:EventTrigger>
                    			</i:Interaction.Triggers>
                            </TextBlock>
                            <TextBlock TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0" d:LayoutOverrides="HorizontalAlignment"><Run Text="© Geert van der Cruijsen"/></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem Header="720p">
            	<Grid Margin="0">
            		<Grid.RowDefinitions>
            			<RowDefinition/>
            			<RowDefinition Height="20"/>
            			<RowDefinition Height="40"/>
            		</Grid.RowDefinitions>
            		<ListBox ItemsSource="{Binding S720pPhones}" ItemContainerStyle="{StaticResource ContainerStyle}" SelectedItem="{Binding Selected720, Mode=TwoWay}">
            			<ListBox.ItemsPanel>
            				<ItemsPanelTemplate>
            					<StackPanel Orientation="Horizontal"/>
            				</ItemsPanelTemplate>
            			</ListBox.ItemsPanel>
            		</ListBox>
            		<TextBlock TextWrapping="Wrap" Text="{Binding StatusText720p}" Grid.Row="1" Margin="0,0,0,5"/>
                    <StackPanel Orientation="Horizontal" Grid.Row="2">
                        <Image Source="Assets/Windows 8.png" Width="30" Height="30" Margin="5,0,0,5"/>
                        <StackPanel HorizontalAlignment="Right" Margin="230,0,0,0">
                            <TextBlock TextWrapping="Wrap" Text="V1.0 http://wp8emulatorskins.codeplex.com" Margin="0" d:LayoutOverrides="Width" HorizontalAlignment="Right">
                    			<i:Interaction.Triggers>
                    				<i:EventTrigger EventName="MouseLeftButtonDown">
                    					<ei:LaunchUriOrFileAction Path="http://wp8emulatorskins.codeplex.com"/>
                    				</i:EventTrigger>
                    			</i:Interaction.Triggers>
                            </TextBlock>
                            <TextBlock TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0" d:LayoutOverrides="HorizontalAlignment"><Run Text="© Geert van der Cruijsen"/></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem Header="About">
				<StackPanel Margin="5,0,0,0">
                    <TextBlock Text="This application is made by Geert van der Cruijsen." Margin="0,0,0,5"/>
				    <TextBlock Text="Did you create a skin for the WP8 emulator and it's not listed in this application?" FontWeight="Bold"/>
				    <TextBlock Text="Send me a mail or contact me on twitter or codeplex and i'm happy to include it to this"/>
				    <TextBlock Text="application."/>
				    <TextBlock Text="Found a bug or a skin is not working properly?" FontWeight="Bold" Margin="0,5,0,0"/>
				    <TextBlock Text="please let me know on twitter and i'll try to fix it as soon as possible"/>

                    <TextBlock Text="Change history" Margin="0,10,0,0"/>
                    <TextBlock Text="1.0" FontWeight="Bold"/>
                    <TextBlock Text="- First version including 17 skins"/>

                    <TextBlock Text="Contact:" Margin="0,10,0,0"/>
                    <TextBlock Text="Codeplex: http://wp8emulatorskins.codeplex.com" Margin="0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="MouseLeftButtonDown">
                                    <ei:LaunchUriOrFileAction Path="http://wp8emulatorskins.codeplex.com"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                    </TextBlock>
                    <TextBlock Text="Twitter: @geertvdc" Margin="0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="MouseLeftButtonDown">
                                    <ei:LaunchUriOrFileAction Path="http://twitter.com/geertvdc"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                    </TextBlock>
                    <TextBlock Text="Mail: geert@vdcruijsen.net" Margin="0">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="MouseLeftButtonDown">
                                <ei:LaunchUriOrFileAction Path="mailto:geert@vdcruijsen.net"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>                    
                    </TextBlock>
                    <TextBlock Text="Blog: http://vdcruijsen.net" Margin="0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="MouseLeftButtonDown">
                                    <ei:LaunchUriOrFileAction Path="http://vdcruijsen.net"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                    </TextBlock>
				</StackPanel>
            </TabItem>
        </TabControl>
    </Grid>
</metro:Window>
